import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('user', () => {
    // 用户状态
    const userInfo = ref({
        id: 'user123',
        name: '访客',
        avatar: 'https://img1.baidu.com/it/u=2897073946,1539786358&fm=253&app=138&f=JPEG?w=800&h=800'
    })

    // API 配置
    const apiConfig = ref({
        cozeApiKey: 'cztei_qTB7Scp4POJnPVVFXXAsTAKpYCxEtMxlv1gbsX9wHoXuUCBe2V1brow9EQAnzWz4x', // 替换为你的实际 API 密钥
        endpoint: 'https://api.coze.cn/v3/chat?'
    })

    return { userInfo, apiConfig }
})